//
//  PKIconView.m
//  PianKe
//
//  Created by lanou on 16/1/5.
//  Copyright © 2016年 JasperSong. All rights reserved.
//

#import "PKIconView.h"

@implementation PKIconView


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    
    if (self){
        // 图标是一个按钮
        _iconButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _iconButton.frame = CGRectMake(0, 0, self.height, self.height);
        [self addSubview:_iconButton];
        
        // 数据的label
        _infoLabel = [[UILabel alloc]initWithFrame:CGRectMake(_iconButton.right, 0, self.width - _iconButton.width, self.height)];
        _infoLabel.textColor = [UIColor lightGrayColor];
        _infoLabel.adjustsFontSizeToFitWidth = YES;
        [self addSubview:_infoLabel];
        
    }
    
    return self;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
